<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition>

        <p:dialog id="BookListCreateDlg" widgetVar="BookListCreateDialog" modal="true" resizable="false" appendToBody="true" header="#{bundle.CreateBookListTitle}">

            <h:form id="BookListCreateForm">

                <h:panelGroup id="display">
                    <p:panelGrid columns="2" rendered="#{bookListController.selected != null}">

                        <p:outputLabel value="#{bundle.CreateBookListLabel_bookListPK_idbookList}" for="bookListPK_idbookList" />
                        <p:inputText id="bookListPK_idbookList" value="#{bookListController.selected.bookListPK.idbookList}" title="#{bundle.CreateBookListTitle_bookListPK_idbookList}" required="true" requiredMessage="#{bundle.CreateBookListRequiredMessage_bookListPK_idbookList}"/>

                        <p:outputLabel value="#{bundle.CreateBookListLabel_bookListPK_bookBorrowingEmployeeidEmployee}" for="bookListPK_bookBorrowingEmployeeidEmployee" />
                        <p:inputText id="bookListPK_bookBorrowingEmployeeidEmployee" value="#{bookListController.selected.bookListPK.bookBorrowingEmployeeidEmployee}" title="#{bundle.CreateBookListTitle_bookListPK_bookBorrowingEmployeeidEmployee}" required="true" requiredMessage="#{bundle.CreateBookListRequiredMessage_bookListPK_bookBorrowingEmployeeidEmployee}"/>

                        <p:outputLabel value="#{bundle.CreateBookListLabel_bookListPK_bookBorrowingStudentidStudent}" for="bookListPK_bookBorrowingStudentidStudent" />
                        <p:inputText id="bookListPK_bookBorrowingStudentidStudent" value="#{bookListController.selected.bookListPK.bookBorrowingStudentidStudent}" title="#{bundle.CreateBookListTitle_bookListPK_bookBorrowingStudentidStudent}" required="true" requiredMessage="#{bundle.CreateBookListRequiredMessage_bookListPK_bookBorrowingStudentidStudent}"/>

                        <p:outputLabel value="#{bundle.CreateBookListLabel_book}" for="book" />
                        <p:selectOneMenu id="book" value="#{bookListController.selected.book}" required="true" requiredMessage="#{bundle.EditBookListRequiredMessage_book}">
                            <f:selectItem itemLabel="#{bundle.SelectOneMessage}"/>
                            <f:selectItems value="#{bookController.items}"
                                           var="bookItem"
                                           itemValue="#{bookItem}"
                                           itemLabel="#{bookItem.name.toString()}"
                                           />
                            <f:converter binding="#{bookConverter}"/>
                        </p:selectOneMenu>

                        <p:outputLabel value="#{bundle.CreateBookListLabel_bookReceptionidbookReception}" for="bookReceptionidbookReception" />
                        <p:selectOneMenu id="bookReceptionidbookReception" value="#{bookListController.selected.bookReceptionidbookReception}" required="true" requiredMessage="#{bundle.EditBookListRequiredMessage_bookReceptionidbookReception}">
                            <f:selectItem itemLabel="#{bundle.SelectOneMessage}"/>
                            <f:selectItems value="#{bookReceptionController.items}"
                                           var="bookReceptionidbookReceptionItem"
                                           itemValue="#{bookReceptionidbookReceptionItem}"
                                           itemLabel="#{bookReceptionidbookReceptionItem.idbookReception.toString()}"
                                           />
                            <f:converter binding="#{bookReceptionConverter}"/>
                        </p:selectOneMenu>

                        <p:outputLabel value="#{bundle.CreateBookListLabel_bookBorrowing}" for="bookBorrowing" />
                        <p:selectOneMenu id="bookBorrowing" value="#{bookListController.selected.bookBorrowing}" required="true" requiredMessage="#{bundle.EditBookListRequiredMessage_bookBorrowing}">
                            <f:selectItem itemLabel="#{bundle.SelectOneMessage}"/>
                            <f:selectItems value="#{bookBorrowingController.items}"
                                           var="bookBorrowingItem"
                                           itemValue="#{bookBorrowingItem}"
                                           itemLabel="#{bookBorrowingItem.idbookBorrowing.toString()}"
                                           />
                            <f:converter binding="#{bookBorrowingConverter}"/>
                        </p:selectOneMenu>
                    </p:panelGrid>
                    <p:commandButton actionListener="#{bookListController.saveNew}" value="#{bundle.Save}" update="display,:BookListListForm:datalist,:growl" oncomplete="handleSubmit(xhr,status,args,BookListCreateDialog);"/>
                    <p:commandButton value="#{bundle.Cancel}" onclick="BookListCreateDialog.hide()"/>
                </h:panelGroup>

            </h:form>

        </p:dialog>

    </ui:composition>

</html>
